package com.yc.mybatis.mybatisplusgenerator.enumeration;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * 性别枚举
 *
 * @author wbg
 * @date 2019-06-14.
 */
public enum GenderEnum implements IEnum<Integer> {

    MALE(0,"男"), FEMALE(1,"女");
    @EnumValue
    private Integer code;

    private String msg;

    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }

    GenderEnum(Integer code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getValue() {
        return this.code;
    }

    @Override
    public String toString() {
        return this.msg;
    }

}
